package com.lonelyzhe.springboot.mapper;

import com.lonelyzhe.springboot.bean.OrderInfo;
import com.lonelyzhe.springboot.bean.OrderItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderInfoMapper {
    List<OrderInfo> getAllOrdersById(@Param("user_id")int user_id);
    List<OrderInfo> getAllOrdersByIdWithoutPay(@Param("user_id")int user_id);
    List<OrderInfo> getAllOrdersByIdWithPay(@Param("user_id")int user_id);
    List<OrderItem> getOrderItemsById(@Param("id")int id);
    OrderInfo getOrderDetails(@Param("id")int id);
    String getStatus(@Param("id")int id);
    void updateToPay(@Param("id")int id);
    void updateToCancel(@Param("id")int id);
}
